package xing.example.converter;

import org.springframework.core.convert.converter.Converter;
import org.springframework.stereotype.Component;
import xing.example.bean.A;

/**
 * @author xing
 * @date 2023/2/15 18:19:55
 */
public class StringToA implements Converter<String, A> {
    @Override
    public A convert(String source) {
        // return new A(Integer.parseInt(source) + 1);
        return new A(Integer.parseInt(source));
    }
}
